package com.tianlan.blog.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import org.hibernate.validator.constraints.Email;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.Pattern;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author jeebase
 * @since 2018-05-26
 */
@SuppressWarnings("deprecation")
@ApiModel(value = "RegisterUser对象", description = "用户注册信息")
public class RegisterUser  {
    
	/**
     * 邮箱
     */
	
	@NotBlank(message = "邮箱不能为空")
    @Email(message = "请输入邮箱格式：xx@xx.com")
	@ApiModelProperty(value = "用户邮箱", required = true, dataType = "String", notes = "邮箱格式：xx@xx.com")
	private String userEmail;
	

    /**
     * 昵称
     */
    @NotBlank(message = "用户显示昵称不能为空")
    @Length(max = 8, min = 2, message = "户显示昵称范围应该在2-8位之间。")
    @ApiModelProperty(value = "用户显示昵称", required = true, dataType = "String", notes = "用户显示昵称长度范围应该在2-8位之间。")
    private String userNickName;

    /**
     * 账号
     */
    @NotBlank(message = "账号不能为空")
    @Pattern(regexp = "^[a-zA-Z0-9]{4,12}$", message = "账号请输入4-16位，不含特殊字符密码。")
    @ApiModelProperty(value = "用户账号", required = true, dataType = "String", notes = "输入4-16位，登陆账号只能是英文或数字，不含特殊字符密码。")
    private String userAccount;

    /**
     * 密码
     */
    @NotBlank(message = "密码不能为空")
    @Pattern(regexp = "^[a-zA-Z0-9_]{6,18}$", message = "密码请输入6-18位，不含特殊字符密码。")
    @ApiModelProperty(value = "用户密码", required = true, dataType = "String", notes = "输入6-18位，不含特殊字符密码。")
    private String userPassword;
    
    /**
     * 确认密码 ^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,18}$
     */
    @NotBlank(message = "确认密码不能为空")
    @Pattern(regexp = "^[a-zA-Z0-9_]{6,18}$", message = "确认密码请输入6-18位，不含特殊字符密码。")
    @ApiModelProperty(value = "用户密码", required = true, dataType = "String", notes = "确认密码输入6-18位，不含特殊字符密码。")
    private String userPasswordIs;
    
    /**
     * 电话
     */
    @NotBlank(message = "手机号不能为空")
    @Pattern(regexp = "^[1][1-9][0-9]{9}$", message = "请输入正确手机号。")
    @ApiModelProperty(value = "用户电话", required = true, dataType = "String")
    private String userMobile;

    /**
     * 图片验证码
     */
    // @NotBlank(message="图片验证码不能为空")
    // private String vCode;

//    @NotBlank(message = "不能为空")
//    @ApiModelProperty(value = "图片验证码", required = true, dataType = "String")
//    private String verkey;

    /**
     * 短信验证码
     */
    @NotBlank(message = "短信验证码不能为空")
    @Length(max = 6, min = 6, message = "请输入6位数短信验证码。")
    @ApiModelProperty(value = "短信验证码", required = true, dataType = "String", notes = "输入6位数短信验证码。")
    private String smsCode;

    /**
     * '0'禁用，'1' 启用, '2' 密码过期或初次未修改
     */
    private String userStatus;

//    private Integer roleId;
    
    
    

    public String getUserEmail() {
		return userEmail;
	}

	public String getUserPasswordIs() {
		return userPasswordIs;
	}

	public void setUserPasswordIs(String userPasswordIs) {
		this.userPasswordIs = userPasswordIs;
	}

	public void setUserEmail(String userEmail) {
		this.userEmail = userEmail;
	}

	public String getUserAccount() {
		return userAccount;
	}

	public void setUserAccount(String userAccount) {
		this.userAccount = userAccount;
	}

	public String getUserNickName() {
        return userNickName;
    }

    public void setUserNickName(String userNickName) {
        this.userNickName = userNickName;
    }

    public String getUserMobile() {
        return userMobile;
    }

    public void setUserMobile(String userMobile) {
        this.userMobile = userMobile;
    }

    public String getUserPassword() {
        return userPassword;
    }

    public void setUserPassword(String userPassword) {
        this.userPassword = userPassword;
    }

    public String getUserStatus() {
        return userStatus;
    }

    public void setUserStatus(String userStatus) {
        this.userStatus = userStatus;
    }

//    public Integer getRoleId() {
//        return roleId;
//    }
//
//    public void setRoleId(Integer roleId) {
//        this.roleId = roleId;
//    }

    // public String getvCode()
    // {
    // return vCode;
    // }
    //
    // public void setvCode( String vCode )
    // {
    // this.vCode = vCode;
    // }

    public String getSmsCode() {
        return smsCode;
    }

    public void setSmsCode(String smsCode) {
        this.smsCode = smsCode;
    }

//    public String getVerkey() {
//        return verkey;
//    }
//
//    public void setVerkey(String verkey) {
//        this.verkey = verkey;
//    }

    @Override
    public String toString() {
        return "User{" + "userName=" + userNickName + ", userMobile=" + userMobile + ", userPassword=" + userPassword
                + ", userStatus=" + userStatus;
    }
}
